﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace System
{
    public static class ControlExt
    {
        public static bool HasChildInRegion(this Control control, System.Drawing.Point p, System.Drawing.Size s)
        {
            Rectangle r = new Rectangle(p, s);
            foreach (Control c in control.Controls)
                if (c.Bounds.IntersectsWith(r))
                    return true;
            return false;
        }
    }
}
